/**
 * \file    description.h
 * \brief   Parser generator.
 * \author  Jérôme LAURENS
 * \version 0.1
 * \date    September 19, 2014
 *
 * Reads a LALR(1) grammar, generates a parser based on a template file.
 * This is based on lemon parser generator, but has strongly been
 * revisited.
 *
 */

#ifndef DESCRIPTION_H
#define DESCRIPTION_H

#include "common.h"

LPP_NAMESPACE_BEGIN

class Description
{
public:
    Description();
    String operator()(SymbolRef const & __s, Index const verbosity=0) const;
    String operator()(Symbol const & __s, Index const verbosity=0) const;
    String operator()(RuleRef const & __r, Index const verbosity=0) const;
    String operator()(Rule const & __r, Index const verbosity=0) const;
    String operator()(ItemRef const & item) const;
    String operator()(Generator const & g, bool only_core_items) const;
    String operator()(Action const & action
                      , String::size_type indent = 0
                      , bool show_conflicts = false) const;
    String operator()(ActionRef const & action
                      , String::size_type indent = 0
                      , bool show_conflicts = false) const;
    String operator()(GrammarRef const & grammar, Index const verbosity=0) const;
    String operator()(Grammar const & grammar, Index const verbosity) const;
    String operator()(StateRef const & __s, Index const verbosity=0) const;
    String operator()(State const & __s, Index const verbosity=0) const;
};

LPP_NAMESPACE_END

#endif // DESCRIPTION_H
